package Render;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.*;

import Classe.Menu;
import Classe.Repas;
import Classe.Restaurant;


public class RepasRender extends JLabel implements ListCellRenderer<Repas> {

	private JPanel panel;


	@Override
	public Component getListCellRendererComponent(JList<? extends Repas> list,
			Repas pRepas, int index, boolean isSelected, boolean CellHasFocus) {
		if(pRepas!=null){
			
			setText(pRepas.getNom());			
			if(isSelected)
				setBackground(new Color(184,207,229,194));
			else
				setBackground(new Color(255,255,255,194));
			setOpaque(true);
			setSize(100, 100);
			
			
		}else{
		setText("Aucun Repas");
		}
		return this;
	}
}
